import { Model, Table, Column, DataType, CreatedAt, UpdatedAt } from "Sequelize-typescript";
import sequelize from "../db/index";

/*
 * @Author: fishroom
 * @Date: 2022-09-28 13:52:01
 * @LastEditTime: 2023-01-04 20:32:21
 * @FilePath: \koa\app\model\sys_user.ts
 */
@Table
class sys_user extends Model {
  @Column
  username!: string;
  @Column({
    type: DataType.INTEGER,
    primaryKey: true,
    autoIncrement: true,
    unique: true,
    allowNull: false,
  })
  user_id!: number;
  @CreatedAt
  create_time!: string;
  @UpdatedAt
  update_time!: string;
  // @Column
  // password!: string;
  @Column
  email!: string;
  @Column
  mobile!: string;
  @Column
  status!: number;
  @Column
  role_id!: number;
  @Column
  avatarUrl!: string;
}

export default sys_user;
